﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Input;

namespace FIM
{
    public class BiAxialThumbstick : BiAxialInput
    {
        public override Vector2 Value
        {
            get
            {
                if (thumb == Thumbstick.Right)
                    return manager.CurrentGamepad[player].ThumbSticks.Right * mul;

                return manager.CurrentGamepad[player].ThumbSticks.Left * mul;
            }
        }
        int player;
        Thumbstick thumb;

        public BiAxialThumbstick(CManager inputManager, PlayerIndex playerIndex, Thumbstick whichOne)
            : this(inputManager, 1, playerIndex, whichOne) { }

        public BiAxialThumbstick(CManager inputManager, float multiplier, PlayerIndex playerIndex, Thumbstick whichOne)
            : base(inputManager, multiplier)
        {
            player = (int)playerIndex;
            thumb = whichOne;
        }
    }
}
